diff options
| author | dujinkim <dujin.kim@dtsolution.co.kr> | 2025-10-13 08:56:27 +0000 |
|---|---|---|
| committer | dujinkim <dujin.kim@dtsolution.co.kr> | 2025-10-13 08:56:27 +0000 |
| commit | b9a2081a76e669688d5884f20482b37cc8acca22 (patch) | |
| tree | 385e78c05d193a54daaced836f1e1152696153a8 /app/[lng]/evcp/(evcp)/(procurement)/bid/page.tsx | |
| parent | e84cf02a1cb4959a9d3bb5bbf37885c13a447f78 (diff) | |
(최겸, 임수민) 구매 입찰, 견적(그룹코드, tbe에러) 수정, data-room 수정
Diffstat (limited to 'app/[lng]/evcp/(evcp)/(procurement)/bid/page.tsx')
| -rw-r--r-- | app/[lng]/evcp/(evcp)/(procurement)/bid/page.tsx | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/app/[lng]/evcp/(evcp)/(procurement)/bid/page.tsx b/app/[lng]/evcp/(evcp)/(procurement)/bid/page.tsx index 3a45e61f..aa9f33b5 100644 --- a/app/[lng]/evcp/(evcp)/(procurement)/bid/page.tsx +++ b/app/[lng]/evcp/(evcp)/(procurement)/bid/page.tsx @@ -7,6 +7,7 @@ import { getBiddingTypeCounts, getBiddingManagerCounts, getBiddingMonthlyStats, + getUserCodeByEmail, } from "@/lib/bidding/service" import { searchParamsCache } from "@/lib/bidding/validation" import { BiddingsPageHeader } from "@/lib/bidding/list/biddings-page-header" @@ -32,12 +33,26 @@ export default async function BiddingsPage(props: IndexPageProps) { const validFilters = getValidFilters(search.filters) + // ✅ 입찰 데이터를 먼저 가져옴 + const biddingsResult = await getBiddings({ + ...search, + filters: validFilters, + }) + + // ✅ 입찰 데이터에 managerCode 추가 + const biddingsDataWithManagerCode = await Promise.all( + biddingsResult.data.map(async (item) => { + let managerCode: string | null = null + if (item.managerEmail) { + managerCode = await getUserCodeByEmail(item.managerEmail) + } + return { ...item, managerCode: managerCode || null } + }) + ) + // ✅ 모든 데이터를 병렬로 로드 const promises = Promise.all([ - getBiddings({ - ...search, - filters: validFilters, - }), + Promise.resolve({ ...biddingsResult, data: biddingsDataWithManagerCode }), getBiddingStatusCounts(), getBiddingTypeCounts(), getBiddingManagerCounts(), |
